//
//  AppImage.swift
//  APP
//
//  Created by LXF on 2018/1/5.
//  Copyright © 2018年 Rdxer. All rights reserved.
//

import Foundation
import UIKit


let fastRes = "FastComponentResources"

class AppImage {
    /// 矩形 红 []
    static let rectFlagImage = AppColor.mainColor.toImage(size: CGSize.init(width: 3, height: 12))!
    
    private static var _loading_gif:UIImage?
    open static var loading_gif:UIImage!{
        if _loading_gif == nil{
            var imageList:[UIImage] = []
            
            for index in 0...90{
                let str = NSString.init(format: "%02d", index)
                var image = "aph_loading".imageWithSelf(name: "loading\(str.description).png")
//                image = UIImage.init(data: (image?.dataForPNGRepresentation())!, scale: 1.5)
                image = UIImage.init(data: UIImagePNGRepresentation(image!)!, scale: 1.5)
                imageList.append(image!)
            }
            
            _loading_gif = UIImage.animatedImage(with: imageList, duration: 10)
        }
        return _loading_gif
    }
    
    
    // UIImage.animatedImage(with: <#T##[UIImage]#>, duration: <#T##TimeInterval#>)
    
    public static var qrcodeImage:UIImage{
        return #imageLiteral(resourceName: "invitation_qrcode_release")
    }
    
}
